package com.onedec.message.entity;

import java.util.ArrayList;
import java.util.List;

public class OnedecMsgExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public OnedecMsgExample() {
        oredCriteria = new ArrayList<>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andMsgIdIsNull() {
            addCriterion("msg_id is null");
            return (Criteria) this;
        }

        public Criteria andMsgIdIsNotNull() {
            addCriterion("msg_id is not null");
            return (Criteria) this;
        }

        public Criteria andMsgIdEqualTo(Integer value) {
            addCriterion("msg_id =", value, "msgId");
            return (Criteria) this;
        }

        public Criteria andMsgIdNotEqualTo(Integer value) {
            addCriterion("msg_id <>", value, "msgId");
            return (Criteria) this;
        }

        public Criteria andMsgIdGreaterThan(Integer value) {
            addCriterion("msg_id >", value, "msgId");
            return (Criteria) this;
        }

        public Criteria andMsgIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("msg_id >=", value, "msgId");
            return (Criteria) this;
        }

        public Criteria andMsgIdLessThan(Integer value) {
            addCriterion("msg_id <", value, "msgId");
            return (Criteria) this;
        }

        public Criteria andMsgIdLessThanOrEqualTo(Integer value) {
            addCriterion("msg_id <=", value, "msgId");
            return (Criteria) this;
        }

        public Criteria andMsgIdIn(List<Integer> values) {
            addCriterion("msg_id in", values, "msgId");
            return (Criteria) this;
        }

        public Criteria andMsgIdNotIn(List<Integer> values) {
            addCriterion("msg_id not in", values, "msgId");
            return (Criteria) this;
        }

        public Criteria andMsgIdBetween(Integer value1, Integer value2) {
            addCriterion("msg_id between", value1, value2, "msgId");
            return (Criteria) this;
        }

        public Criteria andMsgIdNotBetween(Integer value1, Integer value2) {
            addCriterion("msg_id not between", value1, value2, "msgId");
            return (Criteria) this;
        }

        public Criteria andMsgSenderIdIsNull() {
            addCriterion("msg_sender_id is null");
            return (Criteria) this;
        }

        public Criteria andMsgSenderIdIsNotNull() {
            addCriterion("msg_sender_id is not null");
            return (Criteria) this;
        }

        public Criteria andMsgSenderIdEqualTo(Integer value) {
            addCriterion("msg_sender_id =", value, "msgSenderId");
            return (Criteria) this;
        }

        public Criteria andMsgSenderIdNotEqualTo(Integer value) {
            addCriterion("msg_sender_id <>", value, "msgSenderId");
            return (Criteria) this;
        }

        public Criteria andMsgSenderIdGreaterThan(Integer value) {
            addCriterion("msg_sender_id >", value, "msgSenderId");
            return (Criteria) this;
        }

        public Criteria andMsgSenderIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("msg_sender_id >=", value, "msgSenderId");
            return (Criteria) this;
        }

        public Criteria andMsgSenderIdLessThan(Integer value) {
            addCriterion("msg_sender_id <", value, "msgSenderId");
            return (Criteria) this;
        }

        public Criteria andMsgSenderIdLessThanOrEqualTo(Integer value) {
            addCriterion("msg_sender_id <=", value, "msgSenderId");
            return (Criteria) this;
        }

        public Criteria andMsgSenderIdIn(List<Integer> values) {
            addCriterion("msg_sender_id in", values, "msgSenderId");
            return (Criteria) this;
        }

        public Criteria andMsgSenderIdNotIn(List<Integer> values) {
            addCriterion("msg_sender_id not in", values, "msgSenderId");
            return (Criteria) this;
        }

        public Criteria andMsgSenderIdBetween(Integer value1, Integer value2) {
            addCriterion("msg_sender_id between", value1, value2, "msgSenderId");
            return (Criteria) this;
        }

        public Criteria andMsgSenderIdNotBetween(Integer value1, Integer value2) {
            addCriterion("msg_sender_id not between", value1, value2, "msgSenderId");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverIdIsNull() {
            addCriterion("msg_receiver_id is null");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverIdIsNotNull() {
            addCriterion("msg_receiver_id is not null");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverIdEqualTo(Integer value) {
            addCriterion("msg_receiver_id =", value, "msgReceiverId");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverIdNotEqualTo(Integer value) {
            addCriterion("msg_receiver_id <>", value, "msgReceiverId");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverIdGreaterThan(Integer value) {
            addCriterion("msg_receiver_id >", value, "msgReceiverId");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("msg_receiver_id >=", value, "msgReceiverId");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverIdLessThan(Integer value) {
            addCriterion("msg_receiver_id <", value, "msgReceiverId");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverIdLessThanOrEqualTo(Integer value) {
            addCriterion("msg_receiver_id <=", value, "msgReceiverId");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverIdIn(List<Integer> values) {
            addCriterion("msg_receiver_id in", values, "msgReceiverId");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverIdNotIn(List<Integer> values) {
            addCriterion("msg_receiver_id not in", values, "msgReceiverId");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverIdBetween(Integer value1, Integer value2) {
            addCriterion("msg_receiver_id between", value1, value2, "msgReceiverId");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverIdNotBetween(Integer value1, Integer value2) {
            addCriterion("msg_receiver_id not between", value1, value2, "msgReceiverId");
            return (Criteria) this;
        }

        public Criteria andMsgTypeIsNull() {
            addCriterion("msg_type is null");
            return (Criteria) this;
        }

        public Criteria andMsgTypeIsNotNull() {
            addCriterion("msg_type is not null");
            return (Criteria) this;
        }

        public Criteria andMsgTypeEqualTo(Integer value) {
            addCriterion("msg_type =", value, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgTypeNotEqualTo(Integer value) {
            addCriterion("msg_type <>", value, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgTypeGreaterThan(Integer value) {
            addCriterion("msg_type >", value, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgTypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("msg_type >=", value, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgTypeLessThan(Integer value) {
            addCriterion("msg_type <", value, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgTypeLessThanOrEqualTo(Integer value) {
            addCriterion("msg_type <=", value, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgTypeIn(List<Integer> values) {
            addCriterion("msg_type in", values, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgTypeNotIn(List<Integer> values) {
            addCriterion("msg_type not in", values, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgTypeBetween(Integer value1, Integer value2) {
            addCriterion("msg_type between", value1, value2, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgTypeNotBetween(Integer value1, Integer value2) {
            addCriterion("msg_type not between", value1, value2, "msgType");
            return (Criteria) this;
        }

        public Criteria andMsgContentIsNull() {
            addCriterion("msg_content is null");
            return (Criteria) this;
        }

        public Criteria andMsgContentIsNotNull() {
            addCriterion("msg_content is not null");
            return (Criteria) this;
        }

        public Criteria andMsgContentEqualTo(String value) {
            addCriterion("msg_content =", value, "msgContent");
            return (Criteria) this;
        }

        public Criteria andMsgContentNotEqualTo(String value) {
            addCriterion("msg_content <>", value, "msgContent");
            return (Criteria) this;
        }

        public Criteria andMsgContentGreaterThan(String value) {
            addCriterion("msg_content >", value, "msgContent");
            return (Criteria) this;
        }

        public Criteria andMsgContentGreaterThanOrEqualTo(String value) {
            addCriterion("msg_content >=", value, "msgContent");
            return (Criteria) this;
        }

        public Criteria andMsgContentLessThan(String value) {
            addCriterion("msg_content <", value, "msgContent");
            return (Criteria) this;
        }

        public Criteria andMsgContentLessThanOrEqualTo(String value) {
            addCriterion("msg_content <=", value, "msgContent");
            return (Criteria) this;
        }

        public Criteria andMsgContentLike(String value) {
            addCriterion("msg_content like", value, "msgContent");
            return (Criteria) this;
        }

        public Criteria andMsgContentNotLike(String value) {
            addCriterion("msg_content not like", value, "msgContent");
            return (Criteria) this;
        }

        public Criteria andMsgContentIn(List<String> values) {
            addCriterion("msg_content in", values, "msgContent");
            return (Criteria) this;
        }

        public Criteria andMsgContentNotIn(List<String> values) {
            addCriterion("msg_content not in", values, "msgContent");
            return (Criteria) this;
        }

        public Criteria andMsgContentBetween(String value1, String value2) {
            addCriterion("msg_content between", value1, value2, "msgContent");
            return (Criteria) this;
        }

        public Criteria andMsgContentNotBetween(String value1, String value2) {
            addCriterion("msg_content not between", value1, value2, "msgContent");
            return (Criteria) this;
        }

        public Criteria andMsgGroupIdIsNull() {
            addCriterion("msg_group_id is null");
            return (Criteria) this;
        }

        public Criteria andMsgGroupIdIsNotNull() {
            addCriterion("msg_group_id is not null");
            return (Criteria) this;
        }

        public Criteria andMsgGroupIdEqualTo(Integer value) {
            addCriterion("msg_group_id =", value, "msgGroupId");
            return (Criteria) this;
        }

        public Criteria andMsgGroupIdNotEqualTo(Integer value) {
            addCriterion("msg_group_id <>", value, "msgGroupId");
            return (Criteria) this;
        }

        public Criteria andMsgGroupIdGreaterThan(Integer value) {
            addCriterion("msg_group_id >", value, "msgGroupId");
            return (Criteria) this;
        }

        public Criteria andMsgGroupIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("msg_group_id >=", value, "msgGroupId");
            return (Criteria) this;
        }

        public Criteria andMsgGroupIdLessThan(Integer value) {
            addCriterion("msg_group_id <", value, "msgGroupId");
            return (Criteria) this;
        }

        public Criteria andMsgGroupIdLessThanOrEqualTo(Integer value) {
            addCriterion("msg_group_id <=", value, "msgGroupId");
            return (Criteria) this;
        }

        public Criteria andMsgGroupIdIn(List<Integer> values) {
            addCriterion("msg_group_id in", values, "msgGroupId");
            return (Criteria) this;
        }

        public Criteria andMsgGroupIdNotIn(List<Integer> values) {
            addCriterion("msg_group_id not in", values, "msgGroupId");
            return (Criteria) this;
        }

        public Criteria andMsgGroupIdBetween(Integer value1, Integer value2) {
            addCriterion("msg_group_id between", value1, value2, "msgGroupId");
            return (Criteria) this;
        }

        public Criteria andMsgGroupIdNotBetween(Integer value1, Integer value2) {
            addCriterion("msg_group_id not between", value1, value2, "msgGroupId");
            return (Criteria) this;
        }

        public Criteria andMsgStatusIsNull() {
            addCriterion("msg_status is null");
            return (Criteria) this;
        }

        public Criteria andMsgStatusIsNotNull() {
            addCriterion("msg_status is not null");
            return (Criteria) this;
        }

        public Criteria andMsgStatusEqualTo(Integer value) {
            addCriterion("msg_status =", value, "msgStatus");
            return (Criteria) this;
        }

        public Criteria andMsgStatusNotEqualTo(Integer value) {
            addCriterion("msg_status <>", value, "msgStatus");
            return (Criteria) this;
        }

        public Criteria andMsgStatusGreaterThan(Integer value) {
            addCriterion("msg_status >", value, "msgStatus");
            return (Criteria) this;
        }

        public Criteria andMsgStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("msg_status >=", value, "msgStatus");
            return (Criteria) this;
        }

        public Criteria andMsgStatusLessThan(Integer value) {
            addCriterion("msg_status <", value, "msgStatus");
            return (Criteria) this;
        }

        public Criteria andMsgStatusLessThanOrEqualTo(Integer value) {
            addCriterion("msg_status <=", value, "msgStatus");
            return (Criteria) this;
        }

        public Criteria andMsgStatusIn(List<Integer> values) {
            addCriterion("msg_status in", values, "msgStatus");
            return (Criteria) this;
        }

        public Criteria andMsgStatusNotIn(List<Integer> values) {
            addCriterion("msg_status not in", values, "msgStatus");
            return (Criteria) this;
        }

        public Criteria andMsgStatusBetween(Integer value1, Integer value2) {
            addCriterion("msg_status between", value1, value2, "msgStatus");
            return (Criteria) this;
        }

        public Criteria andMsgStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("msg_status not between", value1, value2, "msgStatus");
            return (Criteria) this;
        }

        public Criteria andMsgBak1IsNull() {
            addCriterion("msg_bak1 is null");
            return (Criteria) this;
        }

        public Criteria andMsgBak1IsNotNull() {
            addCriterion("msg_bak1 is not null");
            return (Criteria) this;
        }

        public Criteria andMsgBak1EqualTo(String value) {
            addCriterion("msg_bak1 =", value, "msgBak1");
            return (Criteria) this;
        }

        public Criteria andMsgBak1NotEqualTo(String value) {
            addCriterion("msg_bak1 <>", value, "msgBak1");
            return (Criteria) this;
        }

        public Criteria andMsgBak1GreaterThan(String value) {
            addCriterion("msg_bak1 >", value, "msgBak1");
            return (Criteria) this;
        }

        public Criteria andMsgBak1GreaterThanOrEqualTo(String value) {
            addCriterion("msg_bak1 >=", value, "msgBak1");
            return (Criteria) this;
        }

        public Criteria andMsgBak1LessThan(String value) {
            addCriterion("msg_bak1 <", value, "msgBak1");
            return (Criteria) this;
        }

        public Criteria andMsgBak1LessThanOrEqualTo(String value) {
            addCriterion("msg_bak1 <=", value, "msgBak1");
            return (Criteria) this;
        }

        public Criteria andMsgBak1Like(String value) {
            addCriterion("msg_bak1 like", value, "msgBak1");
            return (Criteria) this;
        }

        public Criteria andMsgBak1NotLike(String value) {
            addCriterion("msg_bak1 not like", value, "msgBak1");
            return (Criteria) this;
        }

        public Criteria andMsgBak1In(List<String> values) {
            addCriterion("msg_bak1 in", values, "msgBak1");
            return (Criteria) this;
        }

        public Criteria andMsgBak1NotIn(List<String> values) {
            addCriterion("msg_bak1 not in", values, "msgBak1");
            return (Criteria) this;
        }

        public Criteria andMsgBak1Between(String value1, String value2) {
            addCriterion("msg_bak1 between", value1, value2, "msgBak1");
            return (Criteria) this;
        }

        public Criteria andMsgBak1NotBetween(String value1, String value2) {
            addCriterion("msg_bak1 not between", value1, value2, "msgBak1");
            return (Criteria) this;
        }

        public Criteria andMsgBak2IsNull() {
            addCriterion("msg_bak2 is null");
            return (Criteria) this;
        }

        public Criteria andMsgBak2IsNotNull() {
            addCriterion("msg_bak2 is not null");
            return (Criteria) this;
        }

        public Criteria andMsgBak2EqualTo(String value) {
            addCriterion("msg_bak2 =", value, "msgBak2");
            return (Criteria) this;
        }

        public Criteria andMsgBak2NotEqualTo(String value) {
            addCriterion("msg_bak2 <>", value, "msgBak2");
            return (Criteria) this;
        }

        public Criteria andMsgBak2GreaterThan(String value) {
            addCriterion("msg_bak2 >", value, "msgBak2");
            return (Criteria) this;
        }

        public Criteria andMsgBak2GreaterThanOrEqualTo(String value) {
            addCriterion("msg_bak2 >=", value, "msgBak2");
            return (Criteria) this;
        }

        public Criteria andMsgBak2LessThan(String value) {
            addCriterion("msg_bak2 <", value, "msgBak2");
            return (Criteria) this;
        }

        public Criteria andMsgBak2LessThanOrEqualTo(String value) {
            addCriterion("msg_bak2 <=", value, "msgBak2");
            return (Criteria) this;
        }

        public Criteria andMsgBak2Like(String value) {
            addCriterion("msg_bak2 like", value, "msgBak2");
            return (Criteria) this;
        }

        public Criteria andMsgBak2NotLike(String value) {
            addCriterion("msg_bak2 not like", value, "msgBak2");
            return (Criteria) this;
        }

        public Criteria andMsgBak2In(List<String> values) {
            addCriterion("msg_bak2 in", values, "msgBak2");
            return (Criteria) this;
        }

        public Criteria andMsgBak2NotIn(List<String> values) {
            addCriterion("msg_bak2 not in", values, "msgBak2");
            return (Criteria) this;
        }

        public Criteria andMsgBak2Between(String value1, String value2) {
            addCriterion("msg_bak2 between", value1, value2, "msgBak2");
            return (Criteria) this;
        }

        public Criteria andMsgBak2NotBetween(String value1, String value2) {
            addCriterion("msg_bak2 not between", value1, value2, "msgBak2");
            return (Criteria) this;
        }

        public Criteria andMsgBak3IsNull() {
            addCriterion("msg_bak3 is null");
            return (Criteria) this;
        }

        public Criteria andMsgBak3IsNotNull() {
            addCriterion("msg_bak3 is not null");
            return (Criteria) this;
        }

        public Criteria andMsgBak3EqualTo(String value) {
            addCriterion("msg_bak3 =", value, "msgBak3");
            return (Criteria) this;
        }

        public Criteria andMsgBak3NotEqualTo(String value) {
            addCriterion("msg_bak3 <>", value, "msgBak3");
            return (Criteria) this;
        }

        public Criteria andMsgBak3GreaterThan(String value) {
            addCriterion("msg_bak3 >", value, "msgBak3");
            return (Criteria) this;
        }

        public Criteria andMsgBak3GreaterThanOrEqualTo(String value) {
            addCriterion("msg_bak3 >=", value, "msgBak3");
            return (Criteria) this;
        }

        public Criteria andMsgBak3LessThan(String value) {
            addCriterion("msg_bak3 <", value, "msgBak3");
            return (Criteria) this;
        }

        public Criteria andMsgBak3LessThanOrEqualTo(String value) {
            addCriterion("msg_bak3 <=", value, "msgBak3");
            return (Criteria) this;
        }

        public Criteria andMsgBak3Like(String value) {
            addCriterion("msg_bak3 like", value, "msgBak3");
            return (Criteria) this;
        }

        public Criteria andMsgBak3NotLike(String value) {
            addCriterion("msg_bak3 not like", value, "msgBak3");
            return (Criteria) this;
        }

        public Criteria andMsgBak3In(List<String> values) {
            addCriterion("msg_bak3 in", values, "msgBak3");
            return (Criteria) this;
        }

        public Criteria andMsgBak3NotIn(List<String> values) {
            addCriterion("msg_bak3 not in", values, "msgBak3");
            return (Criteria) this;
        }

        public Criteria andMsgBak3Between(String value1, String value2) {
            addCriterion("msg_bak3 between", value1, value2, "msgBak3");
            return (Criteria) this;
        }

        public Criteria andMsgBak3NotBetween(String value1, String value2) {
            addCriterion("msg_bak3 not between", value1, value2, "msgBak3");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}